package com.wonder.sms;

import com.wonder.sms.smsbao.SmsBaoMessageSendService;
import com.wonder.sms.smsplannet.SmsPlannetMessageSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wonder.sms.ucpass.UcPassMessageSendService;


@Service
public class SmsSendService {
	
	@Autowired
	UcPassMessageSendService ucPassMessageSendService;

	@Autowired
	SmsBaoMessageSendService smsBaoMessageSendService;

	@Autowired
	SmsPlannetMessageSendService smsPlannetMessageSendService;
	
	public String sendMessage(String maker,String mobile,String code,String uid,Integer type) {
		if(maker.equals("ucpaas")) {
			if(type==null || type==1) {
				return ucPassMessageSendService.sendMessage(mobile, code, uid);
			}else {
				return ucPassMessageSendService.sendBatchMessage(mobile, code, uid);
			}
			
		}
		if(maker.equals("smsbao")){
			return smsBaoMessageSendService.sendSms(mobile,code);
		}

		if(maker.equals("smsplannet")){
			return smsPlannetMessageSendService.sendSms(mobile,code);
		}
		
		return null;
			
		
	}

}
